package com.tian.authen.controller;

import com.tian.authen.entity.OauthClient;
import com.tian.authen.entity.User;
import com.tian.authen.service.IOauthAuthorizeService;
import com.tian.common.result.BaseResult;
import com.tian.common.result.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhumengping
 * @title: OauthAuthorizeController
 * @projectName zhump-cloud
 * @date 2023/8/8 16:02
 */
@RestController
@Api(tags = "test")
public class OauthAuthorizeController {


    @Autowired
    private IOauthAuthorizeService authorizeService;

    @RequestMapping(value = "/test",method = RequestMethod.POST)
    @ApiOperation(value = "test controller")
    public BaseResult test(@RequestBody TestRequest request){
        List<OauthClient> test = authorizeService.test(request);
        return Result.ok(test);


    }
}
